home *** CD-ROM | disk | FTP | other *** search
- import hhapplet.AboutDialogBox;
- import hhapplet.ButtonLauncher;
- import hhapplet.ButtonPushEvent;
- import hhapplet.ButtonPushEventListener;
- import hhapplet.DialogDoneTarget;
- import hhapplet.FTSPane;
- import hhapplet.FTSParser;
- import hhapplet.FTSSearcher;
- import hhapplet.IndexPane;
- import hhapplet.IndexSecondaryDialog;
- import hhapplet.IndexSecondaryEntry;
- import hhapplet.LabelLauncher;
- import hhapplet.PopupMenu;
- import hhapplet.SiteMapParserToContents;
- import hhapplet.SiteMapParserToIndex;
- import hhapplet.SplashScreen;
- import hhapplet.TabButton;
- import hhapplet.TabPanel;
- import hhapplet.URLFileHandler;
- import java.applet.Applet;
- import java.awt.BorderLayout;
- import java.awt.CardLayout;
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Image;
- import java.awt.Label;
- import java.awt.LayoutManager;
- import java.awt.Panel;
- import java.awt.Rectangle;
- import java.awt.Window;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.Vector;
- import sitemap.SiteMapParser;
- import treeview.TreeViewImageSet;
-
- public class WebHelp extends Applet implements ButtonPushEventListener {
- private static final String STR_APPLET_ID = "WebHelp Applet Version 1.03.131";
- private static final String STR_COPYRIGHT = "Copyright (c) 1998-1999 Blue Sky Software Corp. All rights reserved.";
- private Window m_winFrameToShow = null;
- private String m_strContentsFile = null;
- private String m_strIndexFile = null;
- private String m_strSearchFile = null;
- private String m_strHelpFile = null;
- private boolean m_bContentsLoaded = false;
- private boolean m_bIndexLoaded = false;
- private boolean m_bSearchLoaded = false;
- private boolean m_bHelpLoaded = false;
- private String m_strCurrentCommand = null;
- private Panel m_pnlNav = null;
- private TabPanel m_pnlTabs = null;
- private CardLayout m_clLayout = null;
- private boolean m_bParsing = false;
- private Image[] m_imgList = null;
- private TreeViewImageSet m_tvisImages = null;
- private SiteMapParser m_smpContents = null;
- private SiteMapParser m_smpIndex = null;
- private SiteMapParser m_smpHelp = null;
- private IndexPane m_ipIndex = null;
- private FTSPane m_spSearch = null;
- private Thread contents_thread = null;
- private Thread parser_thread = null;
- private Thread search_thread = null;
- private TabButton m_tbtnToc = null;
- private TabButton m_tbtnIndex = null;
- private TabButton m_tbtnSearch = null;
- private TabButton m_tbtnHelp = null;
- private boolean m_bMustHaveSize = false;
- private boolean m_bIsIE3 = false;
- private long m_lnTimeCreated = System.currentTimeMillis();
- private FTSParser m_ftsParser = null;
- private FTSSearcher m_ftsSearcher = null;
-
- public void stop() {
- if (this.m_winFrameToShow != null) {
- this.m_winFrameToShow.hide();
- }
-
- System.gc();
- Runtime.getRuntime().gc();
- }
-
- public void notifyButtonPushEvent(ButtonPushEvent var1) {
- if (var1.getSource() == this.m_tbtnToc) {
- boolean var9 = false;
- if (this.m_tbtnToc != null) {
- this.m_tbtnToc.disable();
- this.m_tbtnToc.repaint(0L);
- }
-
- if (this.m_tbtnIndex != null) {
- this.m_tbtnIndex.enable();
- this.m_tbtnIndex.SetDrawRight(true);
- if (!var9) {
- var9 = true;
- this.m_tbtnIndex.SetDrawLeft(false);
- } else {
- this.m_tbtnIndex.SetDrawLeft(true);
- }
-
- this.m_tbtnIndex.repaint(0L);
- }
-
- if (this.m_tbtnSearch != null) {
- this.m_tbtnSearch.enable();
- this.m_tbtnSearch.SetDrawRight(true);
- if (!var9) {
- var9 = true;
- this.m_tbtnSearch.SetDrawLeft(false);
- } else {
- this.m_tbtnSearch.SetDrawLeft(true);
- }
-
- this.m_tbtnSearch.repaint(0L);
- }
-
- if (this.m_tbtnHelp != null) {
- this.m_tbtnHelp.enable();
- this.m_tbtnHelp.SetDrawRight(true);
- if (!var9) {
- var9 = true;
- this.m_tbtnHelp.SetDrawLeft(false);
- } else {
- this.m_tbtnHelp.SetDrawLeft(true);
- }
-
- this.m_tbtnHelp.repaint(0L);
- }
-
- this.RepaintTabs();
- this.DoContents(this.m_strContentsFile);
- } else if (var1.getSource() == this.m_tbtnIndex) {
- boolean var7 = false;
- boolean var12 = false;
- if (this.m_tbtnToc != null) {
- this.m_tbtnToc.enable();
- this.m_tbtnToc.SetDrawLeft(true);
- if (!var12) {
- var12 = true;
- this.m_tbtnToc.SetDrawRight(false);
- } else {
- this.m_tbtnToc.SetDrawRight(true);
- }
-
- this.m_tbtnToc.repaint(0L);
- }
-
- if (this.m_tbtnIndex != null) {
- this.m_tbtnIndex.disable();
- this.m_tbtnIndex.repaint(0L);
- }
-
- if (this.m_tbtnSearch != null) {
- this.m_tbtnSearch.enable();
- this.m_tbtnSearch.SetDrawRight(true);
- if (!var7) {
- var7 = true;
- this.m_tbtnSearch.SetDrawLeft(false);
- } else {
- this.m_tbtnSearch.SetDrawLeft(true);
- }
-
- this.m_tbtnSearch.repaint(0L);
- }
-
- if (this.m_tbtnHelp != null) {
- this.m_tbtnHelp.enable();
- this.m_tbtnHelp.SetDrawRight(true);
- if (!var7) {
- var7 = true;
- this.m_tbtnHelp.SetDrawLeft(false);
- } else {
- this.m_tbtnHelp.SetDrawLeft(true);
- }
-
- this.m_tbtnHelp.repaint(0L);
- }
-
- this.RepaintTabs();
- this.DoIndex(this.m_strIndexFile);
- } else if (var1.getSource() == this.m_tbtnSearch) {
- boolean var5 = false;
- boolean var3 = false;
- if (this.m_tbtnIndex != null) {
- this.m_tbtnIndex.enable();
- this.m_tbtnIndex.SetDrawLeft(true);
- if (!var3) {
- var3 = true;
- this.m_tbtnIndex.SetDrawRight(false);
- } else {
- this.m_tbtnIndex.SetDrawRight(true);
- }
-
- this.m_tbtnIndex.repaint(0L);
- }
-
- if (this.m_tbtnToc != null) {
- this.m_tbtnToc.enable();
- this.m_tbtnToc.SetDrawLeft(true);
- if (!var3) {
- var3 = true;
- this.m_tbtnToc.SetDrawRight(false);
- } else {
- this.m_tbtnToc.SetDrawRight(true);
- }
-
- this.m_tbtnToc.repaint(0L);
- }
-
- if (this.m_tbtnSearch != null) {
- this.m_tbtnSearch.disable();
- this.m_tbtnSearch.repaint(0L);
- }
-
- if (this.m_tbtnHelp != null) {
- this.m_tbtnHelp.enable();
- this.m_tbtnHelp.SetDrawRight(true);
- if (!var5) {
- var5 = true;
- this.m_tbtnHelp.SetDrawLeft(false);
- } else {
- this.m_tbtnHelp.SetDrawLeft(true);
- }
-
- this.m_tbtnHelp.repaint(0L);
- }
-
- this.RepaintTabs();
- this.DoSearch(this.m_strSearchFile);
- } else {
- if (this.m_tbtnHelp != null && var1.getSource() == this.m_tbtnHelp) {
- boolean var2 = false;
- if (this.m_tbtnSearch != null) {
- this.m_tbtnSearch.enable();
- this.m_tbtnSearch.SetDrawLeft(true);
- if (!var2) {
- var2 = true;
- this.m_tbtnSearch.SetDrawRight(false);
- } else {
- this.m_tbtnSearch.SetDrawRight(true);
- }
-
- this.m_tbtnSearch.repaint(0L);
- }
-
- if (this.m_tbtnIndex != null) {
- this.m_tbtnIndex.enable();
- this.m_tbtnIndex.SetDrawLeft(true);
- if (!var2) {
- var2 = true;
- this.m_tbtnIndex.SetDrawRight(false);
- } else {
- this.m_tbtnIndex.SetDrawRight(true);
- }
-
- this.m_tbtnIndex.repaint(0L);
- }
-
- if (this.m_tbtnToc != null) {
- this.m_tbtnToc.enable();
- this.m_tbtnToc.SetDrawLeft(true);
- if (!var2) {
- var2 = true;
- this.m_tbtnToc.SetDrawRight(false);
- } else {
- this.m_tbtnToc.SetDrawRight(true);
- }
-
- this.m_tbtnToc.repaint(0L);
- }
-
- if (this.m_tbtnHelp != null) {
- this.m_tbtnHelp.disable();
- this.m_tbtnHelp.repaint(0L);
- }
-
- this.RepaintTabs();
- this.DoHelp(this.m_strHelpFile);
- }
-
- }
- }
-
- private void DoBadCommand(String var1) {
- ((Container)this).add(new Label("The command \"" + var1 + "\" is unrecognised"));
- }
-
- private void DoNavPane() {
- ((Component)this).setBackground(new Color(192, 192, 192));
- ((Container)this).setLayout(new BorderLayout());
- this.m_strContentsFile = ((Applet)this).getParameter("ContentsFile");
- this.m_strIndexFile = ((Applet)this).getParameter("IndexFile");
- this.m_strSearchFile = ((Applet)this).getParameter("SearchFile");
- this.m_strHelpFile = ((Applet)this).getParameter("HelpFile");
- String var1 = null;
- if (this.m_strContentsFile != null) {
- var1 = ((Applet)this).getParameter("TocTab");
- if (var1 == null) {
- var1 = " Contents ";
- }
- }
-
- String var2 = null;
- if (this.m_strIndexFile != null) {
- var2 = ((Applet)this).getParameter("IndexTab");
- if (var2 == null) {
- var2 = " Index ";
- }
- }
-
- String var3 = null;
- if (this.m_strSearchFile != null) {
- var3 = ((Applet)this).getParameter("SearchTab");
- if (var3 == null) {
- var3 = " Search ";
- }
- }
-
- String var4 = null;
- if (this.m_strHelpFile != null) {
- var4 = ((Applet)this).getParameter("HelpTab");
- if (var4 == null) {
- var4 = "Help";
- }
- }
-
- this.m_pnlTabs = null;
- this.m_pnlTabs = new TabPanel();
- this.m_pnlTabs.setLayout((LayoutManager)null);
- if (this.m_strContentsFile != null) {
- this.m_tbtnToc = new TabButton(var1);
- this.m_tbtnToc.addButtonPushEventListener(this);
- this.m_pnlTabs.add(this.m_tbtnToc);
- }
-
- if (this.m_strIndexFile != null) {
- this.m_tbtnIndex = new TabButton(var2);
- this.m_tbtnIndex.addButtonPushEventListener(this);
- this.m_pnlTabs.add(this.m_tbtnIndex);
- }
-
- if (this.m_strSearchFile != null) {
- this.m_tbtnSearch = new TabButton(var3);
- this.m_tbtnSearch.addButtonPushEventListener(this);
- this.m_pnlTabs.add(this.m_tbtnSearch);
- }
-
- if (this.m_strHelpFile != null) {
- this.m_tbtnHelp = new TabButton(var4);
- this.m_tbtnHelp.addButtonPushEventListener(this);
- this.m_pnlTabs.add(this.m_tbtnHelp);
- }
-
- ((Container)this).add("North", this.m_pnlTabs);
- Rectangle var5 = ((Component)this).bounds();
- if (this.m_tbtnToc != null) {
- this.rods_reshape(this.m_tbtnToc, 1, var5.y, this.m_tbtnToc.preferredSize().width, 25);
- }
-
- if (this.m_tbtnIndex != null) {
- int var6 = 1;
- if (this.m_tbtnToc != null) {
- var6 += this.m_tbtnToc.bounds().width;
- }
-
- this.rods_reshape(this.m_tbtnIndex, var6, var5.y, this.m_tbtnIndex.preferredSize().width, 25);
- }
-
- if (this.m_tbtnSearch != null) {
- int var13 = 1;
- if (this.m_tbtnToc != null) {
- var13 += this.m_tbtnToc.bounds().width;
- }
-
- if (this.m_tbtnIndex != null) {
- var13 += this.m_tbtnIndex.bounds().width;
- }
-
- this.rods_reshape(this.m_tbtnSearch, var13, var5.y, this.m_tbtnSearch.preferredSize().width, 25);
- }
-
- if (this.m_tbtnHelp != null) {
- int var14 = 1;
- if (this.m_tbtnToc != null) {
- var14 += this.m_tbtnToc.bounds().width;
- }
-
- if (this.m_tbtnIndex != null) {
- var14 += this.m_tbtnIndex.bounds().width;
- }
-
- if (this.m_tbtnSearch != null) {
- var14 += this.m_tbtnSearch.bounds().width;
- }
-
- this.rods_reshape(this.m_tbtnHelp, var14, var5.y, this.m_tbtnHelp.preferredSize().width, 25);
- }
-
- this.rods_reshape(this.m_pnlTabs, var5.x, var5.y, var5.width, 28);
- this.m_pnlTabs.requestFocus();
- if (this.m_tbtnIndex != null) {
- this.m_tbtnIndex.enable();
- }
-
- if (this.m_tbtnToc != null) {
- this.m_tbtnToc.enable();
- }
-
- if (this.m_tbtnSearch != null) {
- this.m_tbtnSearch.enable();
- }
-
- if (this.m_tbtnHelp != null) {
- this.m_tbtnHelp.enable();
- }
-
- if (this.m_tbtnToc != null) {
- this.m_tbtnToc.disable();
- }
-
- if (this.m_tbtnIndex != null) {
- this.m_tbtnIndex.disable();
- }
-
- if (this.m_tbtnSearch != null) {
- this.m_tbtnSearch.disable();
- }
-
- if (this.m_tbtnHelp != null) {
- this.m_tbtnHelp.disable();
- }
-
- boolean var15 = true;
- boolean var7 = true;
- String var8 = ((Applet)this).getParameter("CurrentTab");
- if (var8 != null && (var8.equalsIgnoreCase("Index") || var8.equalsIgnoreCase("Search"))) {
- var15 = false;
- }
-
- if (var8 != null && (var8.equalsIgnoreCase("Contents") || var8.equalsIgnoreCase("Search"))) {
- var7 = false;
- }
-
- Object var9 = null;
- ButtonPushEvent var16;
- if (var15) {
- var16 = new ButtonPushEvent(this.m_tbtnToc, 0, 0);
- } else if (var7) {
- var16 = new ButtonPushEvent(this.m_tbtnIndex, 0, 0);
- } else {
- var16 = new ButtonPushEvent(this.m_tbtnSearch, 0, 0);
- }
-
- this.notifyButtonPushEvent(var16);
-
- try {
- String var10 = System.getProperty("java.vendor");
- if (var10.startsWith("Netscape")) {
- Panel var11 = new Panel();
- ((Container)var11).setLayout((LayoutManager)null);
- ((Component)var11).resize(((Component)this).bounds().width, 14);
- ((Container)this).add("South", var11);
- return;
- }
- } catch (Exception var12) {
- }
-
- }
-
- public void Command(String var1, String var2) {
- if (var1 != null) {
- if (var1.equalsIgnoreCase("Contents")) {
- this.DoContents(var2);
- } else if (var1.equalsIgnoreCase("Index")) {
- this.DoIndex(var2);
- } else if (var1.equalsIgnoreCase("Search")) {
- this.DoSearch(var2);
- } else if (var1.equalsIgnoreCase("Version")) {
- this.ShowVersion();
- } else {
- this.DoBadCommand("Command method does not support " + var1);
- }
- }
- }
-
- public void destroy() {
- if (this.m_winFrameToShow != null) {
- this.m_winFrameToShow.hide();
- this.m_winFrameToShow.dispose();
- this.m_winFrameToShow = null;
- }
-
- if (this.m_smpContents != null) {
- this.m_smpContents.closeFiles();
- this.m_smpContents = null;
- }
-
- if (this.m_smpIndex != null) {
- this.m_smpIndex.closeFiles();
- this.m_smpIndex = null;
- }
-
- if (this.m_smpHelp != null) {
- this.m_smpHelp.closeFiles();
- this.m_smpHelp = null;
- }
-
- if (this.m_ipIndex != null && this.m_ipIndex.getList() != null) {
- this.m_ipIndex.getList().clear();
- }
-
- if (this.m_ipIndex != null && this.m_ipIndex.getForAppleList() != null) {
- this.m_ipIndex.getForAppleList().clear();
- }
-
- if (this.m_ipIndex != null) {
- this.m_ipIndex = null;
- }
-
- if (this.m_spSearch != null && this.m_spSearch.getList() != null) {
- this.m_spSearch.getList().clear();
- this.m_spSearch = null;
- }
-
- if (this.m_tvisImages != null) {
- this.m_tvisImages.releaseImages(this.m_imgList);
- this.m_tvisImages = null;
- }
-
- if (this.contents_thread != null && this.contents_thread.isAlive()) {
- this.contents_thread.stop();
- this.contents_thread = null;
- }
-
- if (this.parser_thread != null && this.parser_thread.isAlive()) {
- this.parser_thread.stop();
- this.parser_thread = null;
- }
-
- if (this.search_thread != null && this.search_thread.isAlive()) {
- this.search_thread.stop();
- this.search_thread = null;
- }
-
- System.gc();
- Runtime.getRuntime().gc();
- }
-
- protected void rods_reshape(Component var1, int var2, int var3, int var4, int var5) {
- var1.move(var2, var3);
- var1.resize(var4, var5);
- }
-
- private void DoContents(String var1) {
- if (var1 == null) {
- ((Container)this).setLayout(new BorderLayout());
- }
-
- if (this.m_pnlNav == null) {
- this.m_clLayout = new CardLayout();
- this.m_pnlNav = new Panel();
- this.m_pnlNav.setLayout(this.m_clLayout);
- ((Container)this).add("Center", this.m_pnlNav);
- }
-
- if (this.m_tvisImages == null) {
- this.m_tvisImages = new TreeViewImageSet();
- this.m_imgList = new Image[14];
- this.m_imgList = this.m_tvisImages.reallyGetImages();
- }
-
- if (var1 == null) {
- var1 = ((Applet)this).getParameter("Item1");
- }
-
- if (this.m_bContentsLoaded && this.m_strContentsFile != null && this.m_strContentsFile.equals(var1)) {
- this.m_clLayout.show(this.m_pnlNav, "Contents");
- if (this.m_smpContents != null) {
- ((SiteMapParserToContents)this.m_smpContents.getOutput()).getTree().requestFocus();
- }
-
- } else {
- this.m_strContentsFile = var1;
- this.m_bContentsLoaded = true;
- this.m_bMustHaveSize = true;
- ((Component)this).repaint(0L);
- this.RepaintTabs();
- SiteMapParserToContents var2 = new SiteMapParserToContents(this, this.m_imgList);
- if (this.m_smpContents != null) {
- this.m_smpContents.closeFiles();
- }
-
- ((Applet)this).showStatus("Loading Table of Contents...");
- this.m_pnlNav.add("Contents", var2.getTree());
- this.m_clLayout.show(this.m_pnlNav, "Contents");
- var2.getTree().requestFocus();
- ((Component)this).repaint(0L);
- ((Component)this).show();
- this.m_smpContents = new SiteMapParser(var2);
- this.contents_thread = this.m_smpContents.parseInSeparateThread(var1, ((Applet)this).getDocumentBase(), this);
- var2.getTree().requestFocus();
- }
- }
-
- private void DoHHVersion(boolean var1) {
- String var2 = null;
- Object var3 = null;
- String var4 = null;
- if (!var1) {
- var2 = ((Applet)this).getParameter("Button");
- String var12 = ((Applet)this).getParameter("Text");
- if (var2 == null && var12 == null) {
- return;
- }
-
- var4 = var2 != null ? var2 : var12;
- }
-
- Vector var5 = new Vector();
- var5.addElement("WebHelp Applet Version 1.03.131");
- var5.addElement("Copyright (c) 1998-1999 Blue Sky Software Corp. All rights reserved.");
-
- try {
- var5.addElement("Java VM vendor: " + System.getProperty("java.vendor"));
- } catch (Exception var11) {
- }
-
- try {
- var5.addElement("Java version: " + System.getProperty("java.version"));
- } catch (Exception var10) {
- }
-
- try {
- var5.addElement("Java library version: " + System.getProperty("java.class.version"));
- } catch (Exception var9) {
- }
-
- try {
- String var6 = "Operating System: " + System.getProperty("os.name") + " " + System.getProperty("os.version") + " (" + System.getProperty("os.arch") + ")";
- var5.addElement(var6);
- } catch (Exception var8) {
- }
-
- AboutDialogBox var13 = new AboutDialogBox("About WebHelp Applet", var5);
- if (var1) {
- var13.show();
- } else {
- Object var7 = var2 != null ? new ButtonLauncher(var4, var13) : new LabelLauncher(var4, var13);
- ((Container)this).setLayout(new BorderLayout());
- ((Container)this).add("Center", (Component)var7);
- this.m_winFrameToShow = var13;
- }
- }
-
- public synchronized void resize(int var1, int var2) {
- if (System.getProperty("java.vendor").startsWith("Netscape") && (System.getProperty("os.name").startsWith("Windows") || System.getProperty("os.name").startsWith("Mac")) && !((Applet)this).getParameter("BrowserVersion").equalsIgnoreCase("4.6")) {
- WebHelp$JavaScriptAccess var3 = new WebHelp$JavaScriptAccess(this, this);
- int var4 = var3.GetHeight();
- if (var4 >= 0) {
- var2 = var4;
- }
- }
-
- super.resize(var1, var2);
- }
-
- public synchronized boolean checkSize() {
- if (((Component)this).bounds().width == 0 && ((Component)this).bounds().height == 0) {
- String var1 = ((Applet)this).getDocumentBase().toString();
- int var2 = var1.lastIndexOf(".");
- String var3 = var1.substring(var2, var1.length());
- var1 = var1.substring(0, var2);
- var1 = var1 + "f" + var3;
-
- try {
- URL var4 = new URL(var1);
- ((Applet)this).getAppletContext().showDocument(var4, "_self");
- return false;
- } catch (Exception var5) {
- }
- }
-
- return true;
- }
-
- private void DoSearch(String var1) {
- if (var1 == null) {
- ((Container)this).setLayout(new BorderLayout());
- }
-
- if (this.m_pnlNav == null) {
- this.m_clLayout = new CardLayout();
- this.m_pnlNav = new Panel();
- this.m_pnlNav.setLayout(this.m_clLayout);
- ((Container)this).add("Center", this.m_pnlNav);
- }
-
- if (var1 == null) {
- var1 = ((Applet)this).getParameter("Item1");
- }
-
- if (this.m_bSearchLoaded && this.m_strSearchFile != null && this.m_strSearchFile.equals(var1)) {
- this.m_clLayout.show(this.m_pnlNav, "Search");
- if (this.m_spSearch != null) {
- this.m_spSearch.getEditBox().requestFocus();
- }
-
- } else {
- this.m_strSearchFile = var1;
- this.m_bSearchLoaded = true;
- this.m_bMustHaveSize = true;
- this.m_ftsParser = new FTSParser(this);
- this.m_spSearch = this.m_ftsParser.getFTS();
- this.m_ftsSearcher = this.m_ftsParser.getSearcher();
- if (this.m_spSearch != null && this.m_spSearch.getList() != null) {
- this.m_spSearch.getList().clear();
- this.m_spSearch.getList().addItem("Reading Search Data...");
- }
-
- this.m_pnlNav.add("Search", this.m_spSearch);
- this.m_clLayout.show(this.m_pnlNav, "Search");
- ((Component)this).repaint();
- this.RepaintTabs();
- ((Applet)this).showStatus("Reading Search Data...");
- ((Component)this).show();
- this.search_thread = this.m_ftsParser.parseInSeparateThread(var1, ((Applet)this).getDocumentBase());
- }
- }
-
- private void DoSplash() {
- ((Applet)this).showStatus("Loading Splash Image...");
-
- try {
- Object var1 = null;
- Object var2 = null;
-
- try {
- var13 = ((Applet)this).getImage(URLFileHandler.makeURL(((Applet)this).getDocumentBase(), ((Applet)this).getParameter("Item1"), (String)null));
- } finally {
- ;
- }
-
- int var3 = 2500;
-
- try {
- var3 = new Integer(((Applet)this).getParameter("Item2"));
- } catch (NumberFormatException var10) {
- }
-
- SplashScreen var4 = new SplashScreen(this, var13, var3, (String)var2);
- var4.show();
- } catch (MalformedURLException var12) {
- ((Container)this).add("Center", new Label("Can't open URL or file " + ((Throwable)var12).getMessage()));
- }
- }
-
- private void DoAboutBox() {
- String var1 = ((Applet)this).getParameter("Button");
- String var2 = ((Applet)this).getParameter("Text");
- if (var1 != null || var2 != null) {
- String var3 = var1 != null ? var1 : var2;
- String var4 = ((Applet)this).getParameter("Item1");
- Vector var5 = new Vector();
-
- String var7;
- for(int var6 = 0; (var7 = ((Applet)this).getParameter("Item" + (var6 + 2))) != null; ++var6) {
- var5.addElement(var7);
- }
-
- AboutDialogBox var8 = new AboutDialogBox(var4, var5);
- Object var9 = var1 != null ? new ButtonLauncher(var3, var8) : new LabelLauncher(var3, var8);
- ((Container)this).setLayout(new BorderLayout());
- ((Container)this).add("Center", (Component)var9);
- this.m_winFrameToShow = var8;
- }
- }
-
- private void RepaintTabs() {
- if (this.m_pnlNav != null) {
- this.m_pnlNav.paintAll(this.m_pnlNav.getGraphics());
- }
-
- if (this.m_tbtnToc != null) {
- this.m_tbtnToc.paint(this.m_tbtnToc.getGraphics());
- }
-
- if (this.m_tbtnIndex != null) {
- this.m_tbtnIndex.paint(this.m_tbtnIndex.getGraphics());
- }
-
- if (this.m_tbtnSearch != null) {
- this.m_tbtnSearch.paint(this.m_tbtnSearch.getGraphics());
- }
-
- if (this.m_tbtnHelp != null) {
- this.m_tbtnHelp.paint(this.m_tbtnHelp.getGraphics());
- }
-
- }
-
- private void DoIndex(String var1) {
- if (var1 == null) {
- ((Container)this).setLayout(new BorderLayout());
- }
-
- if (this.m_pnlNav == null) {
- this.m_clLayout = new CardLayout();
- this.m_pnlNav = new Panel();
- this.m_pnlNav.setLayout(this.m_clLayout);
- ((Container)this).add("Center", this.m_pnlNav);
- }
-
- if (var1 == null) {
- var1 = ((Applet)this).getParameter("Item1");
- }
-
- if (this.m_bIndexLoaded && this.m_strIndexFile != null && this.m_strIndexFile.equals(var1)) {
- this.m_clLayout.show(this.m_pnlNav, "Index");
- if (this.m_ipIndex != null) {
- this.m_ipIndex.getEditBox().requestFocus();
- }
-
- } else {
- this.m_strIndexFile = var1;
- this.m_bIndexLoaded = true;
- this.m_bMustHaveSize = true;
- SiteMapParserToIndex var2 = new SiteMapParserToIndex(this);
- if (this.m_ipIndex != null && this.m_ipIndex.getList() != null) {
- this.m_ipIndex.getList().clear();
- }
-
- this.m_ipIndex = var2.getIndex();
- this.m_pnlNav.add("Index", this.m_ipIndex);
- this.m_clLayout.show(this.m_pnlNav, "Index");
- this.m_pnlNav.paintAll(this.m_pnlNav.getGraphics());
- this.RepaintTabs();
- ((Applet)this).showStatus("Loading Index...");
- if (this.m_smpIndex != null) {
- this.m_smpIndex.closeFiles();
- }
-
- if (this.m_ipIndex != null) {
- this.m_ipIndex.getEditBox().requestFocus();
- }
-
- ((Component)this).show();
- this.m_smpIndex = new SiteMapParser(var2);
- if (this.m_ipIndex.GetUseForAppleListFlag()) {
- this.m_ipIndex.paintAll(this.m_ipIndex.getGraphics());
- this.m_smpIndex.parseInCurrentThread(var1, ((Applet)this).getDocumentBase(), this);
- } else {
- this.parser_thread = this.m_smpIndex.parseInSeparateThread(var1, ((Applet)this).getDocumentBase(), this);
- }
- }
- }
-
- public void start() {
- if (this.m_bMustHaveSize) {
- this.checkSize();
- }
-
- }
-
- public String getAppletInfo() {
- return "WebHelp Applet Version 1.03.131" + "\r\n" + "Copyright (c) 1998-1999 Blue Sky Software Corp. All rights reserved.";
- }
-
- public void Click() {
- if (this.m_winFrameToShow != null) {
- if (this.m_bIsIE3) {
- MethodRunner var1 = new MethodRunner(this.m_winFrameToShow, "ClickThread");
- ((Thread)var1).start();
- return;
- }
-
- this.m_winFrameToShow.show();
- }
-
- }
-
- private void ShowVersion() {
- this.DoHHVersion(true);
- }
-
- public static int GetFontSize() {
- byte var0 = 12;
- return var0;
- }
-
- public static String GetFontName() {
- return "Dialog";
- }
-
- public void init() {
- System.gc();
- Runtime.getRuntime().gc();
- this.m_lnTimeCreated = System.currentTimeMillis();
- System.out.println("********************Java Information*********************");
- System.out.println("Java VM");
- System.out.println(" Version = " + System.getProperty("java.version"));
- System.out.println(" Vender = " + System.getProperty("java.vendor"));
- System.out.println("Operating System");
- System.out.println(" Name = " + System.getProperty("os.name"));
- System.out.println("Memory");
- System.out.println(" Total = " + Runtime.getRuntime().totalMemory());
- System.out.println(" Free = " + Runtime.getRuntime().freeMemory());
- System.out.println("*********************************************************");
- if (System.getProperty("java.vendor").startsWith("Microsoft") && System.getProperty("java.version").startsWith("1.0")) {
- this.m_bIsIE3 = true;
- }
-
- String var1 = ((Applet)this).getParameter("Command");
- if (var1 != null) {
- if (var1.equalsIgnoreCase("Contents")) {
- this.DoContents((String)null);
- } else if (var1.equalsIgnoreCase("Index")) {
- this.DoIndex((String)null);
- } else if (var1.equalsIgnoreCase("Search")) {
- this.DoSearch((String)null);
- } else if (var1.equalsIgnoreCase("Splash")) {
- this.DoSplash();
- } else if (var1.equalsIgnoreCase("Help")) {
- this.DoHelp((String)null);
- } else if (var1.equalsIgnoreCase("Related Topics")) {
- this.DoRelatedTopics(false);
- } else if (var1.equalsIgnoreCase("Related Topics,MENU")) {
- this.DoRelatedTopics(true);
- } else if (var1.equalsIgnoreCase("HH Version")) {
- this.DoHHVersion(false);
- } else if (var1.equalsIgnoreCase("AboutBox")) {
- this.DoAboutBox();
- } else if (var1.equalsIgnoreCase("NavPane")) {
- this.DoNavPane();
- } else {
- this.DoBadCommand(var1);
- }
-
- this.m_strCurrentCommand = var1;
- ((Component)this).show();
- }
- }
-
- private void DoHelp(String var1) {
- }
-
- private void DoRelatedTopics(boolean var1) {
- ((Applet)this).showStatus("Loading Related Topics Button...");
- String var2 = ((Applet)this).getParameter("Button");
- String var3 = ((Applet)this).getParameter("Text");
- String var4 = ((Applet)this).getParameter("Frame");
- if (var1 && System.getProperty("os.name").startsWith("SunOS")) {
- var1 = false;
- }
-
- boolean var5 = var2 == null && var3 == null;
- String var6 = "";
- if (!var5) {
- var6 = var2 != null ? var2 : var3;
- }
-
- Vector var7 = new Vector();
- int var8 = 0;
-
- String var9;
- while((var9 = ((Applet)this).getParameter("Item" + (var8 + 1))) != null) {
- IndexSecondaryEntry var10 = new IndexSecondaryEntry();
- int var11 = var9.indexOf(59);
- if (var11 != -1 && var11 != var9.length() - 1) {
- int var12 = var9.indexOf(59, var11 + 1);
- String var13 = var9.substring(0, var11);
- String var14 = var12 == -1 ? var9.substring(var11 + 1) : var9.substring(var11 + 1, var12);
- String var15 = var12 == -1 ? null : var9.substring(var11 + 1);
- var10.name = var13;
- var10.local = var14;
- var10.url = var15;
- var10.frame = var4;
- var7.addElement(var10);
- ++var8;
- }
- }
-
- if (var8 != 0) {
- if (var1) {
- PopupMenu var17 = new PopupMenu(this, var7);
- this.m_winFrameToShow = var17;
- } else {
- IndexSecondaryDialog var18 = new IndexSecondaryDialog(this, var7, (DialogDoneTarget)null);
- this.m_winFrameToShow = var18;
- }
-
- if (!var5) {
- Object var16;
- if (var2 != null) {
- var16 = new ButtonLauncher(var6, this.m_winFrameToShow);
- } else {
- var16 = new LabelLauncher(var6, this.m_winFrameToShow);
- }
-
- ((Container)this).setLayout(new BorderLayout());
- ((Container)this).add("Center", (Component)var16);
- }
-
- }
- }
-
- public synchronized void reshape(int var1, int var2, int var3, int var4) {
- if (System.getProperty("java.vendor").startsWith("Netscape") && (System.getProperty("os.name").startsWith("Windows") || System.getProperty("os.name").startsWith("Mac")) && !((Applet)this).getParameter("BrowserVersion").equalsIgnoreCase("4.6")) {
- WebHelp$JavaScriptAccess var5 = new WebHelp$JavaScriptAccess(this, this);
- int var6 = var5.GetHeight();
- if (var6 >= 0) {
- var4 = var6;
- }
- }
-
- super.reshape(var1, var2, var3, var4);
- }
- }
-